package com.gqc.dao;

import com.gqc.bean.Commodity;
import com.gqc.bean.CommodityExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface CommodityMapper {
	long countByExample(CommodityExample example);

	int deleteByExample(CommodityExample example);

	int deleteByPrimaryKey(Integer id);

	int insert(Commodity record);

	int insertSelective(Commodity record);

	List<Commodity> selectByExample(CommodityExample example);

	Commodity selectByPrimaryKey(Integer id);

	int updateByExampleSelective(@Param("record") Commodity record, @Param("example") CommodityExample example);

	int updateByExample(@Param("record") Commodity record, @Param("example") CommodityExample example);

	int updateByPrimaryKeySelective(Commodity record);

	int updateByPrimaryKey(Commodity record);

	List<Commodity> selectBybusiness(String business);

	// 根据用户名查询商品
	List<Commodity> findCommodityByUsername(String username);

	// 根据商品id删除商品
	void deleteCommodityById(int id);
}